﻿<UserControl x:Class="Torrenter.Client.Main.Views.ShellView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="http://www.caliburnproject.org"
             xmlns:Views="clr-namespace:Torrenter.Client.Main.Views" mc:Ignorable="d" 
             MinHeight="800" MinWidth="600"
             d:DesignHeight="300" d:DesignWidth="300">
    <DockPanel LastChildFill="True">
        <Expander ExpandDirection="Right" IsExpanded="True" DockPanel.Dock="Left">
            <StackPanel Margin="0,25,0,0">
                <ItemsControl ItemsSource="{Binding ScreensTypes}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Vertical">
                                <Button MinWidth="120" Content="{Binding Name}" cal:Message.Attach="OpenTab($dataContext)" />
                            </StackPanel>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </StackPanel>
        </Expander>
        <Views:NotifyTraceListener DockPanel.Dock="Bottom" Height="50" MaxHeight="150"/>
        <TabControl x:Name="Items" DockPanel.Dock="Right" >
            <TabControl.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding DisplayName}" MinWidth="50" />                        
                        <Button Content="X" cal:Message.Attach="CloseItem($dataContext)" />
                    </StackPanel>
                </DataTemplate>
            </TabControl.ItemTemplate>
        </TabControl>
    </DockPanel>
</UserControl>
